/*
 * @Author: chengsl
 * @Date: 2021-12-22 10:15:56
 * @LastEditors: chengsl
 * @LastEditTime: 2023-05-09 15:32:21
 * @Description: demoPage页面 资源暴露文件
 * 40@remarks 统一认证 V3 资源对象新增了三个属性 description、hiddenByMenu、morePropertyByJson ;
 * 其中 description 是对这个资源的描述; 另外两个是 功能性的自行参考使用;
 */
import { systemName, method, baseURL, systemEnName } from '@/settings'

import {
  pagePath,
  addOrg
} from '@/api/demoPage'

const apiArr = [
  addOrg
]

export const pageName = 'DemoPage'

const resource = {
  systemName,
  code: `${systemEnName}.page.${pageName}`,
  method: '',
  name: '机构管理',
  type: '2',
  hiddenByMenu: false,
  path: `/${systemEnName}/${pageName}`,
  component: '', // Layout
  operation: [
    {
      systemName,
      method,
      path: pagePath + '/*',
      component: '',
      code: `${systemEnName}.${pageName}.search`,
      name: '查询',
      type: '3',
      description: '查询获取机构的基本信息及其详情',
      operation: []
    }
  ]
}

for (const api of apiArr) {
  resource.operation.push({
    systemName,
    method: api.options.method,
    path: baseURL + api.options.url,
    component: '',
    code: api.code,
    name: api.name,
    type: api.type,
    description: api.description,
    operation: []
  })
}
export { resource }
